package com.fastloan.mgt.verify.model;

/**
 * 人行征信验证结果
 *
 * @author yanwe
 * createTime 2017-12-2017/12/28 9:44
 */
public class GeneralVerifyResult extends VerifyResult {

    /**
     * 验证成功或错误
     */
    private boolean pass;

    /**
     * 信息
     */
    private Object data;

    public boolean isPass() {
        return pass;
    }

    public void setPass(boolean pass) {
        this.pass = pass;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static final class GeneralVerifyResultBuilder {
        private int ret;
        private boolean pass;
        private String msg;
        private Object data;

        private GeneralVerifyResultBuilder() {
        }

        public static GeneralVerifyResultBuilder aGeneralVerifyResult() {
            return new GeneralVerifyResultBuilder();
        }

        public GeneralVerifyResultBuilder withRet(int ret) {
            this.ret = ret;
            return this;
        }

        public GeneralVerifyResultBuilder withPass(boolean pass) {
            this.pass = pass;
            return this;
        }

        public GeneralVerifyResultBuilder withMsg(String msg) {
            this.msg = msg;
            return this;
        }

        public GeneralVerifyResultBuilder withData(Object data) {
            this.data = data;
            return this;
        }

        public GeneralVerifyResult build() {
            GeneralVerifyResult generalVerifyResult = new GeneralVerifyResult();
            generalVerifyResult.setRet(ret);
            generalVerifyResult.setMsg(msg);
            generalVerifyResult.data = this.data;
            generalVerifyResult.pass = this.pass;
            return generalVerifyResult;
        }
    }
}
